//package com.example.android_demo2.room.google
//
//import android.view.View
//import android.view.ViewGroup
//import android.widget.ListAdapter
//import androidx.recyclerview.widget.DiffUtil
//import androidx.recyclerview.widget.RecyclerView
//import java.net.URI.create
//
//class WordListAdapter : ListAdapter<Word, WordViewHolder>(WordsComparator()) {
//
//    override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): WordViewHolder {
//        return WordViewHolder.create(parent)
//    }
//
//    override fun onBindViewHolder(holder: WordViewHolder, position: Int) {
//        val current = getItem(position)
//        holder.bind(current.word)
//    }
//
//
//
//    class WordViewHolder(item: View) : RecyclerView.ViewHolder(item) {
//
//    }
//
//    class WordsComparator : DiffUtil.ItemCallback<Word>() {
//        override fun areItemsTheSame(oldItem: Word, newItem: Word): Boolean {
//            return oldItem == newItem
//        }
//
//        override fun areContentsTheSame(oldItem: Word, newItem: Word): Boolean {
//            return oldItem.word == newItem.word
//        }
//
//    }
//}